﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="Stylesheet" type="text/css" media="screen" href="Screen.css" />
  <title>STP_GetBridgePriority</title>
</head>
<body>
	<h3>STP_GetBridgePriority</h3>
	<hr />
<pre>
unsigned short STP_GetBridgePriority
(
    BRIDGE* bridge,
    int     treeIndex
);
</pre>
	<h4>
		Summary</h4>
	<p>
		Reads the bridge priority, that is, the priority component - most significant 4 bits - of 
		the BridgeIdentifier (§13.24.1 in 802.1Q-2011).</p>
	<h4>
		Parameters</h4>
	<dl>
		<dt>bridge</dt>
		<dd>Pointer to a BRIDGE object, obtained from <a href="STP_CreateBridge.html">
			STP_CreateBridge</a>.</dd>
		<dt>treeIndex</dt>
		<dd>The zero-based index of the spanning tree for which the bridge priority is to be read. 
			For RSTP mode, this must always be zero. For MSTP, it must also be zero, since the current 
			library code only supports one spanning tree - the CIST.</dd>
	</dl>
	<h4>
		Return value</h4>
		<dl>
		<dd>The bridge priority. This is a number between 0 and 61440 (0xF000) hex, in steps of 4096 
			(0x1000 hex).</dd>
		</dl>
	<h4>
		Remarks</h4>
		<p>
			See the Remarks section at <a href="STP_SetBridgePriority.html">STP_SetBridgePriority</a> 
			for more information about the bridge priority and about the BridgeIndentifier.</p>
	
</body>
</html>
